import Vue from 'vue';
import Router from 'vue-router';
import HelloWorld from '../components/HelloWorld.vue';
import HmHome from '../components/HmHome.vue';
import HmSeach from '../components/HmSeach.vue';
import HmNews from '@/components/HmNews.vue';
import HmDetail from '@/components/HmDetail.vue';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      component: HmHome
    },
    {
      path: '/hello',
      component: HelloWorld
    },
    {
      path: '/seach',
      component: HmSeach
    },
    {
      path: '/news',
      component: HmNews
    },
    {
      path: '/detail/:id',
      name: 'detail',
      component: HmDetail,
      props: true 
    },
  ]
});